package com.sl.au.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sl.au.entity.ExdeviExdePersonRoleInfo;
import com.sl.au.repository.ExdeviExdePersonRoleInfoRepository;
import com.sl.au.service.ExdeviExdePersonRoleInfoService;

@Service("ExdeviExdePersonRoleInfoService")
@Transactional
public class ExdeviExdePersonRoleInfoServiceImpl implements ExdeviExdePersonRoleInfoService{
	
	@Autowired
	ExdeviExdePersonRoleInfoRepository exdeviExdePersonRoleInfoRepository;
	
	@Override
	public ExdeviExdePersonRoleInfoRepository getRepository() {
		// TODO Auto-generated method stub
		return this.exdeviExdePersonRoleInfoRepository;
	}

	@Override
	public List<String> findByRole(String accountName) {
		// TODO Auto-generated method stub
		List<String> list = null;
		//Pageable pageable = new PageRequest(start / size, size, Sort.Direction.DESC, "createTime");
		list = exdeviExdePersonRoleInfoRepository.findByRole(accountName);
		//return pages.getContent();
		return list;
	}

	@Override
	public List<String> findRoles(String type, String superior) {
		return exdeviExdePersonRoleInfoRepository.findRoles(type, superior);
	}

	@Override
	public List<String> findRoles(String type, String superior, String areaName) {
		return exdeviExdePersonRoleInfoRepository.findRoles(type, superior, areaName);
	}

}
